home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / May 96 / Re deleting commands bug? < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.0 KB  |  [TEXT/ttxt]

  1. Subject:     Re: deleting commands bug?
  2. Sent:        5/31/96 2:43 PM
  3. Received:    5/31/96 3:01 PM
  4. From:        Mary Boetcher, mary_boetcher@quickmail.apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8.         Reply to:   RE>deleting commands bug?
  9.  
  10. >>I have noticed that FW_CCommand::Execute() will delete the command "this"
  11. >>under TRY/CATCH if the execution throws an exception. This does not seem to
  12. >>be the case in ::UndoIt() or ::RedoIt(). I am concerned about leaving the
  13. >>command in the action stack too when the undo or redo fails.
  14.  
  15. >>What are your thoughts? How should we be handling exceptions at these points?
  16.  
  17. You shouldn't have to do anything special. Once the command has been added to the action stack, it is OpenDoc's responsibility. If an exception occurs in Undo or Redo, OpenDoc catches it and clears the action history. As part of that process it will call DisposeActionState for each of the commands on the stack.
  18.